﻿@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@model WebBookmarkUI.Models.UIBookmarkInfo

<script>
    var showHTML = "@Url.Action("ShowBookmarkHTML")";
    var showBookmarkComment = "@Url.Action("ShowBookmarkComment")";
    var bookmarkID = '@Model.BookmarkInfoID';
    var url = '@Model.Href';
    var saveComment = "@Url.Action("SaveBookmarkComment")";
    var saveBookmarkTagURL = "@Url.Action("SaveBookmarkTag")";

    var removeBookmarkTagURL = "@Url.Action("RemoveBookmarkTag")";
    var collectBookmarkToUserDefaultFolderURL = "@Url.Action("CollectBookmarkToUserDefaultFolder")";
    var addBookmarkLikeLogURL = "@Url.Action("AddBookmarkLikeLog")";

    var showSameHostBookmarkListURL = "@Url.Action("../BookmarkRecommend/ShowSameHostBookmarkList")";
    
</script>
<script src="~/DomainJS/bookmarkdetail.js"></script>


<div class="aw-mod aw-user-detail-box">
    <div class="am-cf am-padding">
        <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg"><a href=''>@Model.BookmarkName</a></strong> / <small>
            <a href='@Url.Content("~/UserInfo/ShowUserDetail?uid=" + Model.UserInfo.UserInfoID)'>@Model.UserInfo.UserName</a></small></div>
    </div>
    <div class="am-fl am-cf" style="margin-left:1%;">
            创建日期：@Model.CreateTime &nbsp;&nbsp;&nbsp;&nbsp;
          
           @if (Model.UserInfoID == WebBookmarkUI.UILoginHelper.GetUIDFromHttpContext(this.Context))
           {
               <span class="am-icon-thumbs-up am-text-secondary" style="margin-left:10px;">&nbsp;@Model.LikeCount</span>
                <span id="TagList" style="margin-left:10px;">
                    标签：
                    @foreach (var tagInfo in Model.TagInfoList)
                    {
                        <a>@tagInfo.TagInfo.TagName<span class="am-icon-close" id="removebookmarkTagInfo" data-id='@tagInfo.BookmarkTagInfoID'> &nbsp;&nbsp;</span></a>
                    }
                </span>
               <input id="inputBookmarkTagName" placeholder="输入标签" data-bookmarkid='@Model.BookmarkInfoID' />

           }
           else
           {
            <span class="am-icon-star am-text-success" data-am-popover="{content: '收藏到我的默认书签夹', trigger: 'hover focus',theme: 'success lg',}"
                  data-id="@Model.BookmarkInfoID" id="CollectBookmark">收藏</span>

              <span class="am-icon-thumbs-up am-text-secondary" data-am-popover="{content: '赞一个', trigger: 'hover focus',theme: 'secondary lg', }"
               style="margin-left:10px;" id="spAddBookmarkLikeLog">&nbsp;@Model.LikeCount</span>

               <span id="TagList" style="margin-left:10px;">
                    标签：
                    @foreach (var tagInfo in Model.TagInfoList)
                    {
                        <a>@tagInfo.TagInfo.TagName</a>
                    }
               </span>
           }
           
      
    </div>

   <div class="mod-footer" style="margin-top:28px;">
            <div class="am-tabs" data-am-tabs="">
                <ul class="am-tabs-nav am-nav am-nav-tabs aw-nav-tabs">
                    <li class=""><a href="#" id="bookmarkHTML" data-id='@Model.BookmarkInfoID' data-url='@Model.Href'>HTML <span id="loadHTML"></span></a></li>
                    <li class="am-active"><a href="#" id="commentInfo" data-id='@Model.BookmarkInfoID'>相关评论 <span id="loadcomment"></span></a></li>
                    <li class=""><a href="#" id="sameHostBookmark" data-id='@Model.BookmarkInfoID'>相关书签 <span id="loadsameHostBookmark"></span></a></li>
                </ul>

                <div class="am-tabs-bd aw-user-center-tab" style="touch-action: pan-y; -webkit-user-select: none; -webkit-user-drag: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);">
                    <div class="am-active am-in" id="overview">

                    </div>
                </div>
            </div>
        </div>
    </div>
